 package com.spacecolony.dao;


import com.spacecolony.model.Player;
import com.spacecolony.model.UserAccount;

public class GameDAOStub implements IGameDAO {

	/*
	 * {@inheritDoc}
	 */
	@Override
	public void updatePlayer(Player player) throws Exception {
		//implementation will need to connect to SQLite and write updates, handling exceptions
		return;
	}

	/*
	 * {@inheritDoc}
	 */
	@Override
	public boolean postToFacebook(String message) {
		//implementation will post to facebook if the user has account connected, then return true
		return false;
	}

	/*
	 * {@inheritDoc}
	 */
	@Override
	public UserAccount loadAccount(int sqlUserId) throws Exception{
		//create a sample user
		UserAccount user = new UserAccount();
		user.setUsername("TestUser");
		
		//create a sample player
		Player player = new Player();
		player.setHp(10);
		player.setProjectileDamage(4);
		player.setThrusterCapacity(10);
		
		//add player to user account
		user.setPlayer(player);
		
		return user;
	}

	/*
	 * {@inheritDoc}
	 */
	@Override
	public UserAccount saveAccount(UserAccount user) throws Exception {
		return user;
		
	}

	/*
	 * {@inheritDoc}
	 */
	@Override
	public Player loadPlayer(int playerId) throws Exception {
		//create a sample player
		Player player = new Player();
		player.setHp(10);
		player.setProjectileDamage(4);
		player.setThrusterCapacity(10);
		
		return player;
	}

}
